-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Use proper autoloading for the kernel rather than file inclusion #897
Conversation
This allows to register the autoloading for AppCache too, making the diff smaller when wanting to use it.
Very 👍 |
sorry to have missed it before the release. I noticed files was used instead of classmap while looking at the KnpUniversity screencast about upgrading a project. |
👍 |
1 similar comment
👍 |
Makes sense to me. @stof is this just a "nice" thing, or are there some real consequences related to autoloading (related to your conversation on symfony/symfony-installer#213)? |
There is a consequence: the AppKernel class is not loaded as soon as you load the composer ClassLoader, but only on first usage, allowing to keep its parent classes in the bootstrap.php.cache file as done previously. the nice side-effect is also making it simpler to use AppCache as it is now autoloaded |
Thank you @stof. |
…nclusion (stof) This PR was merged into the 2.8 branch. Discussion ---------- Use proper autoloading for the kernel rather than file inclusion This allows to register the autoloading for AppCache too, making the diff smaller when wanting to use it. Commits ------- 2c45777 Use proper autoloading for the kernel rather than file inclusion
This fix is not included if I create a new project with the symfony installer tool. # Linux, Mac OS X
$ symfony new test
# Windows
c:\> php symfony new test I think a lot of people (for example beginners) will not know this issue. |
@JHGitty this is expected, as this has been merged after the 2.8 release, and so will be available in the 2.8.1 archives |
It it isn't too much work it would nonetheless be good to rebuild the archives with the current SE to reduce bad experiences for anyone starting new projects based on 2.8.0 or 3.0.0 in the meantime. |
@xabbuh that would need recreating the tags which is probably a bad idea. |
Besides, even for small changes, recreating the published packages is scary because unexpected things could break. |
That because I hope there will be a new release (2.8.1, 3.0.1, ..) as soon as possible 👍 |
As I asked on twitter, a new patch version is released approximately every month, so we can expect 2.8.1 to be released in less than 20 days 👍 😉 |
This allows to register the autoloading for AppCache too, making the diff smaller when wanting to use it.